package mate.managers
{
	import flash.display.DisplayObject;
	
	import mx.core.Application;
	import mx.core.UIComponent;
	import mx.managers.PopUpManager;
	
	import vfc.views.*;
	
	public class MessageWindowManager extends UIComponent
	{
		private var _searchView:MessageWindow;
		
		public function MessageWindowManager(){
		}
		
		public function showView(title:String,displayMessage:String,imageSource:Class):void{
			var _searchView:MessageWindow = new MessageWindow();
			
			if(resourceManager.getString('lang', title) != null)
				_searchView.title = resourceManager.getString('lang', title);
			else
				_searchView.title = title;
			
			
			if(resourceManager.getString('lang', displayMessage) != null)
				_searchView.displayMessage = resourceManager.getString('lang', displayMessage);
			else
				_searchView.displayMessage = displayMessage;
				
			_searchView.imageSource = imageSource;
			
			PopUpManager.addPopUp(_searchView,Application.application as DisplayObject,true);
		}
	}
}